<!-- 零售订单 根据配送方式进行拆分显示 -->
<template>
  <div>
    <!-- 配送方式 1：快递配送 2: 门店自提'  3:'社区团购' 4:'到家自提' 5:'到家配送 -->
    <express-delivery-detail :orderData="orderInfo" v-if="orderInfo.deliveryType == 1" :dictData="dict"></express-delivery-detail>
    <group-buy-detail :orderData="orderInfo" v-if="orderInfo.deliveryType == 3" :dictData="dict"></group-buy-detail>
    <store-detail :orderData="orderInfo" v-if="orderInfo.deliveryType == 4 || orderInfo.deliveryType == 5" :dictData="dict">
    </store-detail>
  </div>
</template>

<script>
  import ExpressDeliveryDetail from './express-delivery-detail/index'
  import GroupBuyDetail from './group-buy-detail/index'
  import StoreDetail from './store-detail/index'
  export default {
    components: {
      ExpressDeliveryDetail,
      GroupBuyDetail,
      StoreDetail
    },
    data() {
      return {
        orderInfo: {},
        dict: {}
      }
    },
    props: {
      orderData: {
        type: Object,
        required: true
      },
      dictData: {
        type: Object,
        required: true
      }
    },
    watch: {
      orderData: {
        handler(nv, ov) {
          this.orderInfo = nv
        }
      },
      dictData: {
        handler(nv, ov) {
          this.dict = nv
        },
        immediate: true
      }
    },
    created() {}
  }
</script>

<style>
</style>
